#include "QuadCommand.h"

QuadCommand::QuadCommand()
	:RenderCommand(Type::QuadCommand)
	,m_material(nullptr)
{

}

QuadCommand::~QuadCommand()
{

}

void QuadCommand::init(int globalZOrder, const Matrix4X4 & mat, const std::shared_ptr<Material> &material, Program * program, const std::vector<VertexPositionTexture> vertexBuffer)
{
	if (m_material != material)
	{
		m_material = material;
	}
	m_globalOrder = globalZOrder;
	m_mat = mat;
	m_vertexBuffer = vertexBuffer;
}

void QuadCommand::updateMat(const Matrix4X4 & mat)
{
	m_mat = mat;
}

void QuadCommand::updateGloablZOrder(int gz)
{
	m_globalOrder = gz;
}

UINT QuadCommand::index[6] =
{
	0,1,2,
	0,2,3
};
